package exception

import (
	"gitee.com/xxhsjp/x-core/app"
	"gitee.com/xxhsjp/x-core/enums"
)

type BindException struct {
	code string
	msg  string
}

func (e *BindException) Code() string {
	return app.App.Code + e.code
}

func (e *BindException) Error() string {
	return e.msg
}

func NewBindException(msg string) *BindException {
	return &BindException{
		code: enums.ParamInvalid.Code,
		msg:  msg,
	}
}
